Communication protocols define the manner in which computers, such as nodes on the Internet, can communicate to transmit packets of information. Protocols typically should be effective, efficient, reliable, and resilient.
TCP is a core protocol within the Internet protocol suite. TCP is a stream based transport protocol that enables web servers and web clients to communicate over the Internet. It provides reliable, in-order delivery of a stream of data, which makes it suitable, e.g., for file transfers and e-mail. TCP is considered a reliable stream delivery service because it guarantees that a stream of data sent from one host to another without loss of data or data duplication. Because packet transfers on networks is not reliable, TCP uses positive acknowledgments with retransmission to guarantee the reliability of packet transfers, which requires a receiver to respond with an acknowledgment message as it receives the data. The sender keeps a record of each packet it sends, and waits for acknowledgment before sending the next packet.
Because TCP is optimized for accurate delivery rather than timely delivery, TCP delivery can result in long delays due to waiting times for out-of-order packets or retransmissions of lost packets. Thus, TCP is not particularly suitable for real-time applications, such as Voice over IP or online gaming.
Other protocols, like the User Datagram Protocol (UDP), may not incur the delays of TCP. UDP is a minimal, message-oriented protocol that is also one of the core protocols of the Internet protocol suite. Using UDP networked computers can facilitate the efficient transmission of short messages (datagrams) among the computers. Unlike TCP, however, UDP does not guarantee reliability or ordering of data. Therefore, datagrams may arrive out of order, appear duplicated, or go missing without notice. Because UDP fails to include overhead for checking whether every packet actually arrived at a destination, UDP is faster than TCP and can be used for applications that do not need guaranteed delivery. For instance, time-sensitive applications often use UDP because dropped packets are preferable to delayed packets.
Both TCP and UDP include undesirable features when executing a file transfer between two firewalled nodes (e.g., computers) on the Internet. TCP is a complex and inefficient protocol having a large header, and UDP is too unreliable. Still other protocols, such as RUDP, are also too complex for effecting file transfer.